1. Field of the Invention
The present invention is directed to the field of image reproduction, and in particular to processes which sharpen, scale, or rotate digital images. More specifically, the invention relates to a method of adjusting the width and spatial resolution of convolution kernels which are used as part of the operation of sharpening or resampling digital images. The invention also relates to creating digital filters by defining a spectrum of the desired filter using a large number of sample points, performing a Fourier transform on the filter spectrum creating a spatial filter and adjusting or reducing the size of the spatial filter.
2. Description of the Related Art
This invention has to do with the field of image reproduction in general and, in particular with processes which use digital methods to sharpen pictures and to scale or rotate pictures. Digital pictures are generally sharpened by convolving their pixel values with a digital sharpening filter. The sharpening filters used for this process can come from a number of sources, but at the time they are actually applied to a picture the sharpening filters have generally been put into the form of an array of values.
One common use of digital sharpening filters is to allow a user to select a sharpening filter which produces a pleasing amount of sharpening for a picture. Applications which perform this operation typically present the operator with a control panel which can be used to set parameter values which are then used to define a sharpening filter. Once the user has selected a set of filtering parameters, the applications create the desired filter and apply it to a copy of the picture on the monitor. To make the operation interactive, the monitor copy is usually much smaller than the full picture. Once the filter has been selected, it is then applied to the entire picture.
One problem which this method of operation entails is that the sharpness which the user sees on the color monitor is usually not the same as the sharpness which comes out on a final print. There are a number of reasons for this discrepancy. For one thing the spatial sampling is often different between the monitor image and the output picture. It is not valid to take the same digital filter and apply it to pictures having varying sample spacings. A second problem is that different devices have different spatial frequency responses. The spatial frequency response of a device is given by its Modulation Transfer Function (MTF), which is equal to the Fourier transform of the result of imaging a single pixel with the device. To appear or look the same, the monitor image needs to be corrected for the difference between the monitor and output MTF. A related problem is that sometimes a user wishes to print the same picture on many different output devices. In that case it is necessary to adjust the sharpening filter in such a way as to allow for different output MTF's and different output sampling rates. The standard way of compensating for different output MTF's is to invert the output or monitor MTF to produce an MTF Compensation (MTFC) filter. There are many standard techniques for performing this inversion. The MTFC filter can then be convolved with the enhancement filter to produce a compensated enhancement filter.
It is also beneficial to be able to use input MTF as a basis for computing a sharpening filter. One way to do this is to produce an MTFC filter for the scanner. The scanner MTFC filter can then be convolved with an enhancement filter chosen by the user to produce a net enhancement filter.
To have a practical system, it is not enough to be able to rescale filters or to convolve filters together. Both operations can make a filtering kernel grow arbitrarily wide. Because of time constraints, there is a limit to how wide a sharpening filter can be. Therefore, a practical system which manages sharpness must have a way to reduce the width of sharpening filters.
Current methods for scaling sharpening filters or adjusting their widths have certain practical defects. One method is to define a filter using an equation which is then used to populate a filtering array right before applying it to a picture. However, using an equation to populate a filtering kernel will distort the filter if the equation predicts non-zero values beyond the extent of the kernel array. Furthermore, an equation for specifying the enhancement or MTFC filter might not be available to the system at the point where the scaling and width adjustment need to take place. Another common method for computing a filter involves specifying various filter properties in Fourier space such as cutoff frequency and pass-band gain and adjusting the filter values until the properties are satisfied. Examples of these are the Parks-McClellan algorithm used by MATLAB. It would be possible to resize a filter by taking its Fourier transform, computing the properties of the transform, and then using those properties to compute a new filter of the desired width. Algorithms of this sort, however, are too complex and therefore too slow to allow a system to perform the required operations as part of an interactive loop.
For these reasons there is a need for a system which can scale digital filters and which can rapidly adjust their width or the number of entries in the filter matrix.